package com.groupe_A.metier;

import java.util.Date;





/**
 * @author mohssine
 * @version 1.0
 * @created 30-avr.-2013 14:44:57
 */
public class Absence {

	private Long idAbsence;
	private Date date;
	private String seance;
	public Matiere matiere;

 

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((date == null) ? 0 : date.hashCode());
		result = prime * result
				+ ((idAbsence == null) ? 0 : idAbsence.hashCode());
		result = prime * result + ((matiere == null) ? 0 : matiere.hashCode());
		result = prime * result + ((seance == null) ? 0 : seance.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Absence other = (Absence) obj;
		if (date == null) {
			if (other.date != null)
				return false;
		} else if (!date.equals(other.date))
			return false;
		if (idAbsence == null) {
			if (other.idAbsence != null)
				return false;
		} else if (!idAbsence.equals(other.idAbsence))
			return false;
		if (matiere == null) {
			if (other.matiere != null)
				return false;
		} else if (!matiere.equals(other.matiere))
			return false;
		if (seance == null) {
			if (other.seance != null)
				return false;
		} else if (!seance.equals(other.seance))
			return false;
		return true;
	}

	public Absence(){
	}
	
	public Absence(Date date, String seance, Matiere matiere) {
		this.date = date;
		this.seance = seance;
		this.matiere = matiere;
	}
	
	public Matiere getMatiere() {
		return matiere;
	}

	public void setMatiere(Matiere matiere) {
		this.matiere = matiere;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getSeance() {
		return seance;
	}

	public void setSeance(String seance) {
		this.seance = seance;
	}

	@Override
	public String toString() {
		return "Absence [idAbsence=" + idAbsence + ", date=" + date
				+ ", seance=" + seance + ", matiere=" + matiere + "]";
	}


	

}